/* eslint-disable */
import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Form from '@/components/Form'
import Request from '@/components/Request'
import upload from '@/components/upload'
import Start from '@/components/Start'

import biliboard from '@/components/Biliboard'
import boardDetail from '@/components/BoardDetail'
import checkStatic from '@/components/CheckStatic'

import home from '@/components/Learn/Home'
import one from '@/components/Learn/One'
import two from '@/components/Learn/Two'
import three from '@/components/Learn/Three'

Vue.use(Router)
export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/request',
      name: 'Request',
      component: Request
    },
    {
      path: '/form',
      name: 'Form',
      component: Form
    },
    {
      path: '/start',
      name: 'Start',
      component: Start
    },
    {
      path: '/upload',
      name: 'upload',
      component: upload
    },
    {
      path: '/teUp',
      name: 'teUp',
      component: () => import('@/components/TestUp')
    },
    {
      path: '/layout',
      name: 'layout',
      component: () => import('@/components/ElementUI/Layout')
    },
    {
      path: '/container',
      name: 'container',
      component: () => import('@/components/ElementUI/Container'),
      children:[
        // {
        //   path:'/', // 嵌套路由里默认是哪个网页
        //   redirect: '/HelloWorld'
        // },
        {
          path: '/biliboard',
          name: 'biliboard',
          component: biliboard
        },
        {
          path: '/boardDetail',
          name: 'boardDetail',
          component: boardDetail
        },{
          path: '/checkStatic',
          name: 'checkStatic',
          component: checkStatic
        }
      ]
    },


    {
      path: '/home', // 主页路由
      name: 'Home',
      component: home,
      children:[ // 嵌套子路由
        {
          path:'one', // 子页面1
          component:one
        },
        {
          path:'two', // 子页面2
          component:two
        },{
          path:'one', // 子页面1
          name: 'one', // 路由名称-命名路由
          component:one
        },{
          path:'/home/two/:id/:name', // 子页面2
          component:two
        },
      ]
    }
    ,{
      path:'/home/three', // 子页面3
      name: 'three',
      component:three
    },{
      path:'/component/parent', // 子页面3
      name: 'parent',
      component:() => import('@/components/Component/parent')
    },{
      path:'/component/testComponent', // 子页面3
      name: 'testComponent',
      component:() => import('@/components/Component/testComponent')

    },
    {
      // 首页
      path: '/mainTest',
      name: 'Main',
      component: () => import('@/components/ElementUI/Main.vue'),
      children:[// 开始嵌套路由，这下面的所有路由都是Main路由的子路由

        {
          path:'/setting', // 设置页面的路由
          name:'Setting',
          component:() => import('@/components/ElementUI/Setting.vue')
        },
        {
          path:'/bindParent', // 子页面3
          name: 'bindParent',
          component:() => import('@/components/Component/BindParent')
        }
      ]
    }




  ]
})
